package dms_classes;

import java.util.ArrayList;
import java.util.List;

/**
 * @file Users.java
 * @version 0.1
 * @author James Dibble 10009689
 */
public class Users {
    // <editor-fold defaultstate="collapsed" desc="Attributes">
    private List<User> users;
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Constructors">
    public Users() {
        users = new ArrayList<User>();
    }
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Methods">
    public User GetUserByID(int id){
        for(User thisUser: users){
            if(thisUser.getUserID() == id) return thisUser;
        }
        return null;
    }
    
    public void AddUser(User givenNewUser){
        users.add(givenNewUser);
    }
    // </editor-fold>
}
